package define

var (
	EmailAddr     = "smtp.163.com"
	EmailPort     = "465"
	EmailUsername = "xxcfasd"
	EmailPassword = "hu19891201"

	UploadImageDomain    = "http://file-changdong-1.img-cn-shanghai.aliyuncs.com/"
	OssEndPoint          = "oss-cn-shanghai.aliyuncs.com"
	OssAccessKeyId       = "LTAIzceaX6PqFgdt"
	OssAccessKeySecret   = "LKK4RZq80qe6rbg82GRCJ1cJ3TCmM2"
	OssBucket            = "file-changdong-1"
	OssChunkSize         = 100 * 1024
	OssDownloadChunkSize = 100 * 1024

	LimiterResource = "request-qps"
	LimiterData     = map[string]interface{}{
		"request-qps": map[string]interface{}{
			"threshold":              100,
			"statIntervalInMs":       1000,
			"tokenCalculateStrategy": 0,
			"controlBehavior":        0,
		},
		"request-interval": map[string]interface{}{
			"threshold":              10000,
			"statIntervalInMs":       1000,
			"tokenCalculateStrategy": 0,
			"controlBehavior":        0,
		},
		"request-millisecond": map[string]interface{}{
			"threshold":              80,
			"statIntervalInMs":       100,
			"tokenCalculateStrategy": 0,
			"controlBehavior":        0,
		},
	}

	CircuitbreakerResource = "request-slow-ratio"
	CircuitbreakerData     = map[string]interface{}{
		"request-slow-ratio": map[string]interface{}{
			"strategy":         0,
			"retryTimeoutMs":   3000,
			"minRequestAmount": 1,
			"statIntervalMs":   10000,
			"maxAllowedRtMs":   5,
			"threshold":        0.1,
		},
		"request-error-ratio": map[string]interface{}{
			"strategy":         1,
			"retryTimeoutMs":   3000,
			"minRequestAmount": 2,
			"statIntervalMs":   10000,
			"maxAllowedRtMs":   5,
			"threshold":        0.5,
		},
		"request-error-count": map[string]interface{}{
			"strategy":         2,
			"retryTimeoutMs":   5000,
			"minRequestAmount": 10,
			"statIntervalMs":   10000,
			"maxAllowedRtMs":   5,
			"threshold":        100,
		},
	}

	IsolationResource  = "request-isolation"
	IsolationThreshold = 12
)
